#-----------------------------------------------------------------
# ** ATTENTION **
# This code was automatically generated from the file:
# Acc/_acc_ast.cfg 
#
# Do not modify it directly. Modify the configuration file and
# run the generator again.
# ** ** *** ** **
#
# pycparser: c_ast.py
#
# AST Node classes.
#
# Copyright (C) 2008-2010, Eli Bendersky
# License: LGPL
#-----------------------------------------------------------------


import sys

from yacf.Frontend.Common.IRNode import IRNode

#class Node(object):
#    """ Abstract base class for AST nodes.
#    """
#    def children(self):
#        """ A sequence of all children that are Nodes
#        """
#        pass
#
#    def show(self, buf=sys.stdout, offset=0, attrnames=False, showcoord=False):
#        """ Pretty print the Node and all its attributes and
#            children (recursively) to a buffer.
#            
#            file:   
#                Open IO buffer into which the Node is printed.
#            
#            offset: 
#                Initial offset (amount of leading spaces) 
#            
#            attrnames:
#                True if you want to see the attribute names in
#                name=value pairs. False to only see the values.
#            
#            showcoord:
#                Do you want the coordinates of each Node to be
#                displayed.
#        """
#        pass
#
#
#class NodeVisitor(object):
#    """ A base NodeVisitor class for visiting c_ast nodes. 
#        Subclass it and define your own visit_XXX methods, where
#        XXX is the class name you want to visit with these 
#        methods.
#        
#        For example:
#        
#        class ConstantVisitor(NodeVisitor):
#            def __init__(self):
#                self.values = []
#            
#            def visit_Constant(self, node):
#                self.values.append(node.value)
#
#        Creates a list of values of all the constant nodes 
#        encountered below the given node. To use it:
#        
#        cv = ConstantVisitor()
#        cv.visit(node)
#        
#        Notes:
#        
#        *   generic_visit() will be called for AST nodes for which 
#            no visit_XXX method was defined. 
#        *   The children of nodes for which a visit_XXX was 
#            defined will not be visited - if you need this, call
#            generic_visit() on the node. 
#            You can use:
#                NodeVisitor.generic_visit(self, node)
#        *   Modeled after Python's own AST visiting facilities
#            (the ast module of Python 3.0)
#    """
#    def visit(self, node):
#        """ Visit a node. 
#        """
#        method = 'visit_' + node.__class__.__name__
#        visitor = getattr(self, method, self.generic_visit)
#        return visitor(node)
#        
#    def generic_visit(self, node):
#        """ Called if no explicit visitor function exists for a 
#            node. Implements preorder visiting of the node.
#        """
#        for c in node.children():
#            self.visit(c)


class AccName    (IRNode):
    def __init__(self, name, label, coord=None, parent=None, depth = None, sequence = None):
        self._initial_entries = {} 
        self.name = name
        self._initial_entries['name'] = name
        self.label = label
        self._initial_entries['label'] = label
        self.coord = coord
        self._initial_entries['coord'] = coord
        self.parent = parent
        self._initial_entries['parent'] = parent
        self.depth = depth
        self._initial_entries['depth'] = depth
        self.sequence = sequence
        self._initial_entries['sequence'] = sequence

    def children(self):
        nodelist = []
        return tuple(nodelist)

    def show(self, buf=sys.stdout, offset=0, attrnames=False, showcoord=False):
        lead = ' ' * offset
        buf.write(lead + 'AccName    : ')

        if attrnames:
            attrstr = ', '.join('%s=%s' % nv for nv in [("name", repr(self.name)), ("label", repr(self.label))])
        else:
            attrstr = ', '.join('%s' % v for v in [self.name, self.label])
        buf.write(attrstr)

        if showcoord:
            buf.write(' (at %s)' % self.coord)
        buf.write('\n')

        for c in self.children():
            c.show(buf, offset + 2, attrnames, showcoord)


class AccParallel (IRNode):
    def __init__(self, name, clauses, stmt, coord=None, parent=None, depth = None, sequence = None):
        self._initial_entries = {} 
        self.name = name
        self._initial_entries['name'] = name
        self.clauses = clauses
        self._initial_entries['clauses'] = clauses
        self.stmt = stmt
        self._initial_entries['stmt'] = stmt
        self.coord = coord
        self._initial_entries['coord'] = coord
        self.parent = parent
        self._initial_entries['parent'] = parent
        self.depth = depth
        self._initial_entries['depth'] = depth
        self.sequence = sequence
        self._initial_entries['sequence'] = sequence

    def children(self):
        nodelist = []
        if self.stmt is not None: nodelist.append(self.stmt)
        if self.clauses is not None: nodelist.extend(self.clauses)
        return tuple(nodelist)

    def show(self, buf=sys.stdout, offset=0, attrnames=False, showcoord=False):
        lead = ' ' * offset
        buf.write(lead + 'AccParallel : ')

        if attrnames:
            attrstr = ', '.join('%s=%s' % nv for nv in [("name", repr(self.name))])
        else:
            attrstr = ', '.join('%s' % v for v in [self.name])
        buf.write(attrstr)

        if showcoord:
            buf.write(' (at %s)' % self.coord)
        buf.write('\n')

        for c in self.children():
            c.show(buf, offset + 2, attrnames, showcoord)


class AccParallelFor (IRNode):
    def __init__(self, name, clauses, stmt, coord=None, parent=None, depth = None, sequence = None):
        self._initial_entries = {} 
        self.name = name
        self._initial_entries['name'] = name
        self.clauses = clauses
        self._initial_entries['clauses'] = clauses
        self.stmt = stmt
        self._initial_entries['stmt'] = stmt
        self.coord = coord
        self._initial_entries['coord'] = coord
        self.parent = parent
        self._initial_entries['parent'] = parent
        self.depth = depth
        self._initial_entries['depth'] = depth
        self.sequence = sequence
        self._initial_entries['sequence'] = sequence

    def children(self):
        nodelist = []
        if self.stmt is not None: nodelist.append(self.stmt)
        if self.clauses is not None: nodelist.extend(self.clauses)
        return tuple(nodelist)

    def show(self, buf=sys.stdout, offset=0, attrnames=False, showcoord=False):
        lead = ' ' * offset
        buf.write(lead + 'AccParallelFor : ')

        if attrnames:
            attrstr = ', '.join('%s=%s' % nv for nv in [("name", repr(self.name))])
        else:
            attrstr = ', '.join('%s' % v for v in [self.name])
        buf.write(attrstr)

        if showcoord:
            buf.write(' (at %s)' % self.coord)
        buf.write('\n')

        for c in self.children():
            c.show(buf, offset + 2, attrnames, showcoord)


class AccKernels (IRNode):
    def __init__(self, name, clauses, stmt, coord=None, parent=None, depth = None, sequence = None):
        self._initial_entries = {} 
        self.name = name
        self._initial_entries['name'] = name
        self.clauses = clauses
        self._initial_entries['clauses'] = clauses
        self.stmt = stmt
        self._initial_entries['stmt'] = stmt
        self.coord = coord
        self._initial_entries['coord'] = coord
        self.parent = parent
        self._initial_entries['parent'] = parent
        self.depth = depth
        self._initial_entries['depth'] = depth
        self.sequence = sequence
        self._initial_entries['sequence'] = sequence

    def children(self):
        nodelist = []
        if self.stmt is not None: nodelist.append(self.stmt)
        if self.clauses is not None: nodelist.extend(self.clauses)
        return tuple(nodelist)

    def show(self, buf=sys.stdout, offset=0, attrnames=False, showcoord=False):
        lead = ' ' * offset
        buf.write(lead + 'AccKernels : ')

        if attrnames:
            attrstr = ', '.join('%s=%s' % nv for nv in [("name", repr(self.name))])
        else:
            attrstr = ', '.join('%s' % v for v in [self.name])
        buf.write(attrstr)

        if showcoord:
            buf.write(' (at %s)' % self.coord)
        buf.write('\n')

        for c in self.children():
            c.show(buf, offset + 2, attrnames, showcoord)


class AccData (IRNode):
    def __init__(self, name, clauses, stmt, coord=None, parent=None, depth = None, sequence = None):
        self._initial_entries = {} 
        self.name = name
        self._initial_entries['name'] = name
        self.clauses = clauses
        self._initial_entries['clauses'] = clauses
        self.stmt = stmt
        self._initial_entries['stmt'] = stmt
        self.coord = coord
        self._initial_entries['coord'] = coord
        self.parent = parent
        self._initial_entries['parent'] = parent
        self.depth = depth
        self._initial_entries['depth'] = depth
        self.sequence = sequence
        self._initial_entries['sequence'] = sequence

    def children(self):
        nodelist = []
        if self.stmt is not None: nodelist.append(self.stmt)
        if self.clauses is not None: nodelist.extend(self.clauses)
        return tuple(nodelist)

    def show(self, buf=sys.stdout, offset=0, attrnames=False, showcoord=False):
        lead = ' ' * offset
        buf.write(lead + 'AccData : ')

        if attrnames:
            attrstr = ', '.join('%s=%s' % nv for nv in [("name", repr(self.name))])
        else:
            attrstr = ', '.join('%s' % v for v in [self.name])
        buf.write(attrstr)

        if showcoord:
            buf.write(' (at %s)' % self.coord)
        buf.write('\n')

        for c in self.children():
            c.show(buf, offset + 2, attrnames, showcoord)


class AccHostData(IRNode):
    def __init__(self, name, varlist, stmt, coord=None, parent=None, depth = None, sequence = None):
        self._initial_entries = {} 
        self.name = name
        self._initial_entries['name'] = name
        self.varlist = varlist
        self._initial_entries['varlist'] = varlist
        self.stmt = stmt
        self._initial_entries['stmt'] = stmt
        self.coord = coord
        self._initial_entries['coord'] = coord
        self.parent = parent
        self._initial_entries['parent'] = parent
        self.depth = depth
        self._initial_entries['depth'] = depth
        self.sequence = sequence
        self._initial_entries['sequence'] = sequence

    def children(self):
        nodelist = []
        if self.stmt is not None: nodelist.append(self.stmt)
        if self.varlist is not None: nodelist.extend(self.varlist)
        return tuple(nodelist)

    def show(self, buf=sys.stdout, offset=0, attrnames=False, showcoord=False):
        lead = ' ' * offset
        buf.write(lead + 'AccHostData: ')

        if attrnames:
            attrstr = ', '.join('%s=%s' % nv for nv in [("name", repr(self.name))])
        else:
            attrstr = ', '.join('%s' % v for v in [self.name])
        buf.write(attrstr)

        if showcoord:
            buf.write(' (at %s)' % self.coord)
        buf.write('\n')

        for c in self.children():
            c.show(buf, offset + 2, attrnames, showcoord)


class AccLoop (IRNode):
    def __init__(self, name, clauses, stmt, coord=None, parent=None, depth = None, sequence = None):
        self._initial_entries = {} 
        self.name = name
        self._initial_entries['name'] = name
        self.clauses = clauses
        self._initial_entries['clauses'] = clauses
        self.stmt = stmt
        self._initial_entries['stmt'] = stmt
        self.coord = coord
        self._initial_entries['coord'] = coord
        self.parent = parent
        self._initial_entries['parent'] = parent
        self.depth = depth
        self._initial_entries['depth'] = depth
        self.sequence = sequence
        self._initial_entries['sequence'] = sequence

    def children(self):
        nodelist = []
        if self.stmt is not None: nodelist.append(self.stmt)
        if self.clauses is not None: nodelist.extend(self.clauses)
        return tuple(nodelist)

    def show(self, buf=sys.stdout, offset=0, attrnames=False, showcoord=False):
        lead = ' ' * offset
        buf.write(lead + 'AccLoop : ')

        if attrnames:
            attrstr = ', '.join('%s=%s' % nv for nv in [("name", repr(self.name))])
        else:
            attrstr = ', '.join('%s' % v for v in [self.name])
        buf.write(attrstr)

        if showcoord:
            buf.write(' (at %s)' % self.coord)
        buf.write('\n')

        for c in self.children():
            c.show(buf, offset + 2, attrnames, showcoord)


class AccParallelOption (IRNode):
    def __init__(self, name, value, coord=None, parent=None, depth = None, sequence = None):
        self._initial_entries = {} 
        self.name = name
        self._initial_entries['name'] = name
        self.value = value
        self._initial_entries['value'] = value
        self.coord = coord
        self._initial_entries['coord'] = coord
        self.parent = parent
        self._initial_entries['parent'] = parent
        self.depth = depth
        self._initial_entries['depth'] = depth
        self.sequence = sequence
        self._initial_entries['sequence'] = sequence

    def children(self):
        nodelist = []
        return tuple(nodelist)

    def show(self, buf=sys.stdout, offset=0, attrnames=False, showcoord=False):
        lead = ' ' * offset
        buf.write(lead + 'AccParallelOption : ')

        if attrnames:
            attrstr = ', '.join('%s=%s' % nv for nv in [("name", repr(self.name)), ("value", repr(self.value))])
        else:
            attrstr = ', '.join('%s' % v for v in [self.name, self.value])
        buf.write(attrstr)

        if showcoord:
            buf.write(' (at %s)' % self.coord)
        buf.write('\n')

        for c in self.children():
            c.show(buf, offset + 2, attrnames, showcoord)


class AccClause (IRNode):
    def __init__(self, name, type, identifiers, coord=None, parent=None, depth = None, sequence = None):
        self._initial_entries = {} 
        self.name = name
        self._initial_entries['name'] = name
        self.type = type
        self._initial_entries['type'] = type
        self.identifiers = identifiers
        self._initial_entries['identifiers'] = identifiers
        self.coord = coord
        self._initial_entries['coord'] = coord
        self.parent = parent
        self._initial_entries['parent'] = parent
        self.depth = depth
        self._initial_entries['depth'] = depth
        self.sequence = sequence
        self._initial_entries['sequence'] = sequence

    def children(self):
        nodelist = []
        if self.identifiers is not None: nodelist.append(self.identifiers)
        return tuple(nodelist)

    def show(self, buf=sys.stdout, offset=0, attrnames=False, showcoord=False):
        lead = ' ' * offset
        buf.write(lead + 'AccClause : ')

        if attrnames:
            attrstr = ', '.join('%s=%s' % nv for nv in [("name", repr(self.name)), ("type", repr(self.type))])
        else:
            attrstr = ', '.join('%s' % v for v in [self.name, self.type])
        buf.write(attrstr)

        if showcoord:
            buf.write(' (at %s)' % self.coord)
        buf.write('\n')

        for c in self.children():
            c.show(buf, offset + 2, attrnames, showcoord)


class AccSyncronization (IRNode):
    def __init__(self, name, identifiers, coord=None, parent=None, depth = None, sequence = None):
        self._initial_entries = {} 
        self.name = name
        self._initial_entries['name'] = name
        self.identifiers = identifiers
        self._initial_entries['identifiers'] = identifiers
        self.coord = coord
        self._initial_entries['coord'] = coord
        self.parent = parent
        self._initial_entries['parent'] = parent
        self.depth = depth
        self._initial_entries['depth'] = depth
        self.sequence = sequence
        self._initial_entries['sequence'] = sequence

    def children(self):
        nodelist = []
        if self.identifiers is not None: nodelist.append(self.identifiers)
        return tuple(nodelist)

    def show(self, buf=sys.stdout, offset=0, attrnames=False, showcoord=False):
        lead = ' ' * offset
        buf.write(lead + 'AccSyncronization : ')

        if attrnames:
            attrstr = ', '.join('%s=%s' % nv for nv in [("name", repr(self.name))])
        else:
            attrstr = ', '.join('%s' % v for v in [self.name])
        buf.write(attrstr)

        if showcoord:
            buf.write(' (at %s)' % self.coord)
        buf.write('\n')

        for c in self.children():
            c.show(buf, offset + 2, attrnames, showcoord)


class AccAsync (IRNode):
    def __init__(self, name, value, coord=None, parent=None, depth = None, sequence = None):
        self._initial_entries = {} 
        self.name = name
        self._initial_entries['name'] = name
        self.value = value
        self._initial_entries['value'] = value
        self.coord = coord
        self._initial_entries['coord'] = coord
        self.parent = parent
        self._initial_entries['parent'] = parent
        self.depth = depth
        self._initial_entries['depth'] = depth
        self.sequence = sequence
        self._initial_entries['sequence'] = sequence

    def children(self):
        nodelist = []
        if self.value is not None: nodelist.append(self.value)
        return tuple(nodelist)

    def show(self, buf=sys.stdout, offset=0, attrnames=False, showcoord=False):
        lead = ' ' * offset
        buf.write(lead + 'AccAsync : ')

        if attrnames:
            attrstr = ', '.join('%s=%s' % nv for nv in [("name", repr(self.name))])
        else:
            attrstr = ', '.join('%s' % v for v in [self.name])
        buf.write(attrstr)

        if showcoord:
            buf.write(' (at %s)' % self.coord)
        buf.write('\n')

        for c in self.children():
            c.show(buf, offset + 2, attrnames, showcoord)


class AccWait (IRNode):
    def __init__(self, name, value, coord=None, parent=None, depth = None, sequence = None):
        self._initial_entries = {} 
        self.name = name
        self._initial_entries['name'] = name
        self.value = value
        self._initial_entries['value'] = value
        self.coord = coord
        self._initial_entries['coord'] = coord
        self.parent = parent
        self._initial_entries['parent'] = parent
        self.depth = depth
        self._initial_entries['depth'] = depth
        self.sequence = sequence
        self._initial_entries['sequence'] = sequence

    def children(self):
        nodelist = []
        if self.value is not None: nodelist.append(self.value)
        return tuple(nodelist)

    def show(self, buf=sys.stdout, offset=0, attrnames=False, showcoord=False):
        lead = ' ' * offset
        buf.write(lead + 'AccWait : ')

        if attrnames:
            attrstr = ', '.join('%s=%s' % nv for nv in [("name", repr(self.name))])
        else:
            attrstr = ', '.join('%s' % v for v in [self.name])
        buf.write(attrstr)

        if showcoord:
            buf.write(' (at %s)' % self.coord)
        buf.write('\n')

        for c in self.children():
            c.show(buf, offset + 2, attrnames, showcoord)


class AccUpdate (IRNode):
    def __init__(self, name, destination, identifiers, coord=None, parent=None, depth = None, sequence = None):
        self._initial_entries = {} 
        self.name = name
        self._initial_entries['name'] = name
        self.destination = destination
        self._initial_entries['destination'] = destination
        self.identifiers = identifiers
        self._initial_entries['identifiers'] = identifiers
        self.coord = coord
        self._initial_entries['coord'] = coord
        self.parent = parent
        self._initial_entries['parent'] = parent
        self.depth = depth
        self._initial_entries['depth'] = depth
        self.sequence = sequence
        self._initial_entries['sequence'] = sequence

    def children(self):
        nodelist = []
        if self.identifiers is not None: nodelist.extend(self.identifiers)
        return tuple(nodelist)

    def show(self, buf=sys.stdout, offset=0, attrnames=False, showcoord=False):
        lead = ' ' * offset
        buf.write(lead + 'AccUpdate : ')

        if attrnames:
            attrstr = ', '.join('%s=%s' % nv for nv in [("name", repr(self.name)), ("destination", repr(self.destination))])
        else:
            attrstr = ', '.join('%s' % v for v in [self.name, self.destination])
        buf.write(attrstr)

        if showcoord:
            buf.write(' (at %s)' % self.coord)
        buf.write('\n')

        for c in self.children():
            c.show(buf, offset + 2, attrnames, showcoord)


class AccCopy    (IRNode):
    def __init__(self, name, identifiers, present, coord=None, parent=None, depth = None, sequence = None):
        self._initial_entries = {} 
        self.name = name
        self._initial_entries['name'] = name
        self.identifiers = identifiers
        self._initial_entries['identifiers'] = identifiers
        self.present = present
        self._initial_entries['present'] = present
        self.coord = coord
        self._initial_entries['coord'] = coord
        self.parent = parent
        self._initial_entries['parent'] = parent
        self.depth = depth
        self._initial_entries['depth'] = depth
        self.sequence = sequence
        self._initial_entries['sequence'] = sequence

    def children(self):
        nodelist = []
        if self.identifiers is not None: nodelist.append(self.identifiers)
        return tuple(nodelist)

    def show(self, buf=sys.stdout, offset=0, attrnames=False, showcoord=False):
        lead = ' ' * offset
        buf.write(lead + 'AccCopy    : ')

        if attrnames:
            attrstr = ', '.join('%s=%s' % nv for nv in [("name", repr(self.name)), ("present", repr(self.present))])
        else:
            attrstr = ', '.join('%s' % v for v in [self.name, self.present])
        buf.write(attrstr)

        if showcoord:
            buf.write(' (at %s)' % self.coord)
        buf.write('\n')

        for c in self.children():
            c.show(buf, offset + 2, attrnames, showcoord)


class AccDevicePtr  (IRNode):
    def __init__(self, name, identifiers, coord=None, parent=None, depth = None, sequence = None):
        self._initial_entries = {} 
        self.name = name
        self._initial_entries['name'] = name
        self.identifiers = identifiers
        self._initial_entries['identifiers'] = identifiers
        self.coord = coord
        self._initial_entries['coord'] = coord
        self.parent = parent
        self._initial_entries['parent'] = parent
        self.depth = depth
        self._initial_entries['depth'] = depth
        self.sequence = sequence
        self._initial_entries['sequence'] = sequence

    def children(self):
        nodelist = []
        if self.identifiers is not None: nodelist.append(self.identifiers)
        return tuple(nodelist)

    def show(self, buf=sys.stdout, offset=0, attrnames=False, showcoord=False):
        lead = ' ' * offset
        buf.write(lead + 'AccDevicePtr  : ')

        if attrnames:
            attrstr = ', '.join('%s=%s' % nv for nv in [("name", repr(self.name))])
        else:
            attrstr = ', '.join('%s' % v for v in [self.name])
        buf.write(attrstr)

        if showcoord:
            buf.write(' (at %s)' % self.coord)
        buf.write('\n')

        for c in self.children():
            c.show(buf, offset + 2, attrnames, showcoord)


class AccSizeExpression (IRNode):
    def __init__(self, start, end, size, stride, coord=None, parent=None, depth = None, sequence = None):
        self._initial_entries = {} 
        self.start = start
        self._initial_entries['start'] = start
        self.end = end
        self._initial_entries['end'] = end
        self.size = size
        self._initial_entries['size'] = size
        self.stride = stride
        self._initial_entries['stride'] = stride
        self.coord = coord
        self._initial_entries['coord'] = coord
        self.parent = parent
        self._initial_entries['parent'] = parent
        self.depth = depth
        self._initial_entries['depth'] = depth
        self.sequence = sequence
        self._initial_entries['sequence'] = sequence

    def children(self):
        nodelist = []
        if self.start is not None: nodelist.append(self.start)
        if self.end is not None: nodelist.append(self.end)
        if self.size is not None: nodelist.append(self.size)
        if self.stride is not None: nodelist.append(self.stride)
        return tuple(nodelist)

    def show(self, buf=sys.stdout, offset=0, attrnames=False, showcoord=False):
        lead = ' ' * offset
        buf.write(lead + 'AccSizeExpression : ')

        if showcoord:
            buf.write(' (at %s)' % self.coord)
        buf.write('\n')

        for c in self.children():
            c.show(buf, offset + 2, attrnames, showcoord)


class AccParamList (IRNode):
    def __init__(self, params, definitions, coord=None, parent=None, depth = None, sequence = None):
        self._initial_entries = {} 
        self.params = params
        self._initial_entries['params'] = params
        self.definitions = definitions
        self._initial_entries['definitions'] = definitions
        self.coord = coord
        self._initial_entries['coord'] = coord
        self.parent = parent
        self._initial_entries['parent'] = parent
        self.depth = depth
        self._initial_entries['depth'] = depth
        self.sequence = sequence
        self._initial_entries['sequence'] = sequence

    def children(self):
        nodelist = []
        if self.params is not None: nodelist.extend(self.params)
        return tuple(nodelist)

    def show(self, buf=sys.stdout, offset=0, attrnames=False, showcoord=False):
        lead = ' ' * offset
        buf.write(lead + 'AccParamList : ')

        if attrnames:
            attrstr = ', '.join('%s=%s' % nv for nv in [("definitions", repr(self.definitions))])
        else:
            attrstr = ', '.join('%s' % v for v in [self.definitions])
        buf.write(attrstr)

        if showcoord:
            buf.write(' (at %s)' % self.coord)
        buf.write('\n')

        for c in self.children():
            c.show(buf, offset + 2, attrnames, showcoord)


class AccIgnore (IRNode):
    def __init__(self, name, code, coord=None, parent=None, depth = None, sequence = None):
        self._initial_entries = {} 
        self.name = name
        self._initial_entries['name'] = name
        self.code = code
        self._initial_entries['code'] = code
        self.coord = coord
        self._initial_entries['coord'] = coord
        self.parent = parent
        self._initial_entries['parent'] = parent
        self.depth = depth
        self._initial_entries['depth'] = depth
        self.sequence = sequence
        self._initial_entries['sequence'] = sequence

    def children(self):
        nodelist = []
        return tuple(nodelist)

    def show(self, buf=sys.stdout, offset=0, attrnames=False, showcoord=False):
        lead = ' ' * offset
        buf.write(lead + 'AccIgnore : ')

        if attrnames:
            attrstr = ', '.join('%s=%s' % nv for nv in [("name", repr(self.name)), ("code", repr(self.code))])
        else:
            attrstr = ', '.join('%s' % v for v in [self.name, self.code])
        buf.write(attrstr)

        if showcoord:
            buf.write(' (at %s)' % self.coord)
        buf.write('\n')

        for c in self.children():
            c.show(buf, offset + 2, attrnames, showcoord)


